home *** CD-ROM | disk | FTP | other *** search
/ Amiga Games: Greatest Hits 1996 / Amiga Games: Greatest Hits 1996.iso / archive / userbox / publicdomain / yagin.lha / YAGIN / Archives / NewPostNewsSpool.doc < prev    next >
Text File  |  1996-07-01  |  6KB  |  199 lines

  1.                New Post News Spool v4.1
  2.  
  3.                    by
  4.  
  5.                   Nick d'Alterio
  6.  
  7.                    December 1995
  8.  
  9.  
  10. #####################
  11.  
  12. Simple change made by Arndt van der Molen to the 'postnews'
  13. programm. See below.
  14.  
  15. #####################
  16.  
  17.  
  18.  
  19. Introduction
  20. -------------
  21.  
  22. A while back I was looking for a way of spooling news so that I could 
  23. write articles offline and then send them when I went online. I found
  24. the a set of programs to do this in PostNewsSpool by James Burton.
  25.  
  26. However I found that there were a number of problems with postnews
  27. and sendnews such as:-
  28.  
  29. The check to see if online took far too long
  30. Locks were often left on the spool dir 
  31. Lots of unnecessary files were produced
  32. If news posting fails for some reason the message was lost
  33.  
  34. These versions have eliminated these problems and added a couple 
  35. of extra features.
  36.  
  37. Installation
  38. ------------
  39.  
  40. Copy sendnews and postnews to AmiTCP:bin/ and set the appropriate
  41. environment variable described below.
  42.  
  43. postnews should be the program that is called by your news reading
  44. program to post the news. This will spool the article so that you 
  45. can use sendnews to send it off when you go online.
  46.  
  47. Although it is possible to use to spool news without the rest of the
  48. package I recommend that you get the complete postnewsspool archive
  49. by James Burton.
  50.  
  51. Updating
  52. --------
  53.  
  54. Note that from version 3 sendnews will attempt to send any article
  55. in the spooldir no matter what the name is. So if your news reader
  56. produces a fully formed news article with header you can drop it
  57. straight into the spooldir without using postnews.
  58.  
  59. You should remove the seq file if you had it in your spooldir and 
  60. the env variable PNS_SEQFILE
  61.  
  62. If updating from version 3.x to 4.x note that the postnews argument -from has
  63. now changed to -f.
  64.  
  65. Sendnews
  66. --------
  67.  
  68. Simply run the program and it will send off all messages in the
  69. spool directory indicated by the environment variable PNS_SPOOLDIR
  70. (AmiTCP:Usr/Spool/News by default).
  71.  
  72. The news articles will be posted using the program specified in
  73. PNS_NNTPPOST (AmiTCP:bin/NNTPPost by default ). If the posting program
  74. fails to post the article the article will then be appended to the
  75. end of the failed archive indicated by PNS_FAILED_ARC 
  76. ( AmiTCP:Usr/Spool/sendnews.failed by default ). Each file in the
  77. failed archive will be separated by a line containing the date and time
  78. sendnews failed to post the article. 
  79.  
  80. Remember that NNTPPost requires that the environment variable NNTPSERVER
  81. is set.
  82.  
  83. Postnews
  84. --------
  85.  
  86. This spools a news article ready for posting when online. The article can
  87. be complete with header (as prepared by tin) or in its component parts, in which
  88. case postnews puts them together so that the article is ready for posting (Grn style).
  89.  
  90. It places the article in the spool directory PNS_SPOOLDIR (AmiTCP:Usr/Spool/News by default). 
  91. The spooled filename has the format msg.######### where ###### is a 
  92. number which refers to the time of writing.
  93.  
  94. #####################
  95.  
  96. Changed by Arndt van der Molen in Version V4.1a
  97.  
  98. If online at the time of writing the article then postnews immediately
  99. executes the configured PNS_NNTPOST program to send off the article.
  100.          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  101. To stop postnews from sending the article create an enviroment variable
  102. called PNS_OFFLINE.
  103.  
  104. #####################
  105.  
  106. The order of the command line options below is not important. However if the 
  107. option -R or the article is specified more than once then the last occurence
  108. will be used.
  109.  
  110. Command line options:-
  111.  
  112.     -a                   If not using AmiTCP, this will disable
  113.                                        the online check.
  114.  
  115.     -f    "someone@somewhere"      Add a from line to the header of
  116.                        article.
  117.  
  118.     -n                   Don't call sendnews if online
  119.  
  120.         -R     filename                Get the article header from the specified
  121.                                        file.
  122.  
  123.     -x     filename                Delete file if posting is a success.
  124.  
  125.     -h                             Prints some help
  126.  
  127.  
  128. If the parameter for options f, R and x is skipped then the program will print an error
  129. message and exit. (The exception here is if the parameter is skipped and the article
  130. name is the next thing on the command line).
  131.  
  132. The option -x can appear up to 16 times on the command line after which any additional 
  133. usage will be ignored. (This isn't a delete program!!!)
  134.  
  135. Usage Examples
  136. --------------
  137.  
  138.     postnews article        Spools fully formed article 
  139.  
  140.     postnews < article        Spools fully formed article from stdin
  141.  
  142.     postnews article -x article    Spools article then deletes original
  143.  
  144.     postnews body -R header         Spools article made from header and body
  145.  
  146.         postnews body -R header -x header -x body    As above but deletes the original files
  147.  
  148.  
  149. e.g. For tin I use
  150.  
  151. set TIN_POST amitcp:bin/postnews -from "nagd@doc.ic.ac.uk (Nicholas d'Alterio)" %s
  152.  
  153. for Grn try
  154.  
  155.    amitcp:bin/postnews .artcle -R .header -x .article -x .header
  156.  
  157.     
  158. History
  159. -------
  160.  
  161. 4.1   - Postnews - New command line options -R, -x (for Grn users), -a
  162.       - Postnews - Changed check for onlineness
  163.       - Postnews - Improved command line checks
  164. 3.2   - New enviroment variable PNS_OFFLINE
  165. 3.1   - Now uses ADOS functions
  166.       - seq file no longer needed
  167.       - ANY file in the spooldir will be sent
  168.       - the failed archive entries are separated by a line
  169.     containing the time the file failed.
  170.       - new env variable PNS_NNTPPOST allows user to specify
  171.     program to post news
  172.  
  173. 2.1   - Added support for environment variables
  174. 1.x   - Internal test versions
  175.  
  176. Conditions of Use
  177. -----------------
  178.  
  179. Use it how you like just remember I accept NO liability for
  180. ANYTHING that happens.
  181.  
  182. Let me know of what you think of it, bugs, etc
  183.  
  184. Thanks
  185. ------
  186.  
  187. Thanks to James Burton for the original idea and code.
  188.           Jeroen T Vermeulen for some new ideas.
  189.  
  190. ToDo
  191. ----
  192.  
  193. Make sendnews a full NNTP posting client (AmiTCP)
  194.  
  195. ------------------------------------------------------------------------------------
  196. Nick d'Alterio (nagd@doc.ic.ac.uk)
  197.  
  198. $Id: NewPostNewsSpool.doc 1.6 1995/12/19 17:46:28 nagd Exp $
  199.